<template>
  <div class="songList clearFloat details">
    songList
    <playlist :playlists="playlists" v-if="playlists"></playlist>
  </div>
</template>

<script type="text/ecmascript-6">
  import playlist from '../songListItem/songListItem.vue'
  const ERROk = 200
  export default{
    data() {
      return {
        playlists: []
      }
    },
    activated() {
      this.$ajax.get('/top/playlist?limit=20').then((response) => {
        if (response.data.code === ERROk) {
          this.playlists = response.data.playlists
        }
      })
    },
    components: {
      playlist
    }
  }
</script>

<style>
 .songList{

 }
</style>
